<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1>商品列表</h1>
    {% for item in result %}
    <div style="width: 150px;height: 150px;border: 1px solid #ccc;float: left;margin: 10px">
        <p>商品：{{item.name}}</p><p>价格：{{item.price}}</p><p>商家：{{item.shops}}</p><p>运费：{{item.yunfei}}</p>
    </div>
    {% endfor %}
    <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
    <p>
        {% if page > 1 %}
        <a href="?page={{page-1}}&count={{count}}" style="display: inline-block;border: 1px solid #ccc;margin: 2px">
            上一页
        </a>
        {% else %}
        <a style="display: inline-block;border: 1px solid #ccc;margin: 2px">
            上一页
        </a>
        {% endif %}

        {% for page in arr %}
        <a href="?page={{page}}&count={{count}}" style="display: inline-block;border: 1px solid #ccc;margin: 2px">
            {{page}}
        </a>
        {% endfor %}

        {% if page < arr.length %}
        <a href="?page={{page+1}}&count={{count}}" style="display: inline-block;border: 1px solid #ccc;margin: 2px">
            下一页
        </a>
        {% else %}
        <a style="display: inline-block;border: 1px solid #ccc;margin: 2px">
            下一页
        </a>
        {% endif %}
    </p>
</body>
</html>